<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }
    
    img {
        width: 520px;
        height: 280px;
    }
    
    ul,
    li {
        list-style: none;
    }
    
    ul {
        width: 640px;
        height: 280px;
        margin: 30px auto;
        border: 10px solid pink;
    }
    
    li {
        width: 160px;
        height: 100%;
        overflow: hidden;
        position: relative;
        float: left;
    }
</style>

<body>
    <ul>
        <li><img src="01.jpg" alt=""></li>
        <li><img src="02.jpg" alt=""></li>
        <li><img src="03.jpg" alt=""></li>
        <li><img src="04.jpg" alt=""></li>
    </ul>
</body>
<script src="./jquery/jquery.min.js"></script>
<script>
    $('li').mouseenter(function() {
        $(this).siblings().finish().animate({
            width: 40
        }).end().finish().animate({
            width: 520
        })
        $('ul').mouseleave(function() {
            $(this).children().animate({
                width: 160
            }).finish()
        })
    })
</script>

</html>